/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package EC;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author TrangNHIT
 */
@Entity
@Table(name = "tbTaxs")
@NamedQueries({
    @NamedQuery(name = "Taxs.findAll", query = "SELECT t FROM Taxs t"),
    @NamedQuery(name = "Taxs.findByTaxID", query = "SELECT t FROM Taxs t WHERE t.taxID = :taxID"),
    @NamedQuery(name = "Taxs.findByTaxName", query = "SELECT t FROM Taxs t WHERE t.taxName = :taxName"),
    @NamedQuery(name = "Taxs.findByTaxValue", query = "SELECT t FROM Taxs t WHERE t.taxValue = :taxValue")})
public class Taxs implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "Tax_ID")
    private Integer taxID;
    @Basic(optional = false)
    @Column(name = "Tax_Name")
    private String taxName;
    @Basic(optional = false)
    @Column(name = "Tax_Value")
    private String taxValue;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "taxs")
    private List<Bills> billsList;

    public Taxs() {
    }

    public Taxs(Integer taxID) {
        this.taxID = taxID;
    }

    public Taxs(Integer taxID, String taxName, String taxValue) {
        this.taxID = taxID;
        this.taxName = taxName;
        this.taxValue = taxValue;
    }

    public Integer getTaxID() {
        return taxID;
    }

    public void setTaxID(Integer taxID) {
        this.taxID = taxID;
    }

    public String getTaxName() {
        return taxName;
    }

    public void setTaxName(String taxName) {
        this.taxName = taxName;
    }

    public String getTaxValue() {
        return taxValue;
    }

    public void setTaxValue(String taxValue) {
        this.taxValue = taxValue;
    }

    public List<Bills> getBillsList() {
        return billsList;
    }

    public void setBillsList(List<Bills> billsList) {
        this.billsList = billsList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (taxID != null ? taxID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Taxs)) {
            return false;
        }
        Taxs other = (Taxs) object;
        if ((this.taxID == null && other.taxID != null) || (this.taxID != null && !this.taxID.equals(other.taxID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "EC.Taxs[taxID=" + taxID + "]";
    }

}
